// 播放器插件
/**
 * 自动播放下一个
 * @param player 
 */
export const autoPlayerNext = (player: any) => {
	console.log(player)
	
	// 自动播放下一个
	player.on('ended', function() {
        console.log(player);
        const { config, currentVideoIndex } = player;
        const { playNext } = config;
        const urlList = playNext.urlList;
        if (urlList && urlList.length > (currentVideoIndex + 1)) {
            player.src = urlList[currentVideoIndex + 1];
		    player.play();
        }
		// 启动播放器，start一般都是播放器内部隐式调用，主要功能是将video添加到DOM
		// player.start('http://vjs.zencdn.net/v/oceans.mp4');
    });
    
};
